package org.grow.auth.controller;

import org.grow.auth.dao.UltraInfoMapper;
import org.grow.auth.domain.UltraInfo;
import org.grow.auth.service.UltraInfoService;
import org.grow.common.interceptor.AuthInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author: xwg
 * @CreateDate: 2023/9/22
 */

@RestController
@RequestMapping("/ultraInfo")
public class UltraInfoController {
    @Autowired
    private UltraInfoMapper ultraInfoMapper;

    @Autowired
    private UltraInfoService ultraInfoService;

    @GetMapping("/findById")
    public UltraInfo findById() {
        String currentUser = AuthInterceptor.getCurrentUser();
        return ultraInfoService.findByOfficialName(currentUser);
    }
}
